

Created by IntelliJ IDEA.
  User: 李晓容
  Date: 2018/4/28
  Time: 19:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    String username =request.getParameter("username");
    String password =request.getParameter("password");

     if (username.equals("admin")&&password.equals("123456")){

         //登录成功
         session.setAttribute("username","admin");
         response.sendRedirect("userList.jsp");


     }
     else {
         out.write("<h1>登录失败</h1>");
         out.write("<a href='login.jsp'>重新登录</a>");
     }
%>

</body>
</html>
